package com.sgq.vue.service.resource;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sgq.vue.entity.resource.Weather;
import com.sgq.vue.vo.query.resource.UserWeatherVo;
import com.sgq.vue.vo.query.resource.WeatherQueryVo;

import java.util.List;

/**
 * @author: 83778
 * @date: 2023-12-19 18:07
 * @desc:
 */
public interface WeatherService extends IService<Weather> {

    boolean saveUserWeather(Long userId,List<Long> cityIds);

    /**
     * 从数据库查询天气（非实时）
     * @param weatherQueryVo
     * @return
     */
    List<Weather> findWeatherHistory(WeatherQueryVo weatherQueryVo);

    boolean removeByUserId(Long userId);

    //从一个请求源头获取天气信息
    List<Weather> findWeatherOnline(WeatherQueryVo weatherQueryVo,Long userId);

    UserWeatherVo findUserWeatherTree(Long userId, List<Long> roleIds);

    /**
     * 从多个请求源头获取天气信息
     */
    List<Weather> findWeatherOnlineByDynamic(WeatherQueryVo weatherQueryVo,Long userId,Integer days);


}
